<?php
/**
 * Created by PhpStorm.
 * User: C。
 * Date: 2019/8/13
 * Time: 9:04
 */
namespace app\home\controller;

use app\common\model\CompanyBasicinfo as CompanyBasicinfoModel;

/**
 * 寺院基础信息控制器
 * Class Company
 * @package app\home\controller
 */
class Companybasicinfo extends Base
{
    /**
     * [index  首页展示最新的寺院]
     * @param
     * @return json
     * @author [C。]
     */
    public function index()
    {
        $param = input('param.');
        $model = new CompanyBasicinfoModel;
        try{
            $company = $model->findData($param['id'],'comid','comname,registnum,name,addr,img,create_time');
            $company['img'] = explode(',',$company['img']);
        }catch(\Exception $e){
            systembug($e->getMessage(),2,$this->url);
            return admin_json(-1, '获取失败'.$e->getMessage());
        }
        return admin_json(1, '获取成功',$company);
    }
}